package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Entity;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by sss on 2017/8/25.
 */
@Entity
@javax.persistence.Table(name = "l2r_yh_member")
@DynamicInsert
public class L2RYhMember extends BaseEntity{
    private String groupCode;

    @Basic
    @javax.persistence.Column(name = "group_code", nullable = false, length = 20)
    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    private String hotelCode;

    @Basic
    @javax.persistence.Column(name = "hotel_code", nullable = true, length = 20)
    public String getHotelCode() {
        return hotelCode;
    }

    public void setHotelCode(String hotelCode) {
        this.hotelCode = hotelCode;
    }

    private String l2RMemberNo;

    @Basic
    @javax.persistence.Column(name = "l2r_member_no", nullable = false, length = 20)
    public String getL2RMemberNo() {
        return l2RMemberNo;
    }

    public void setL2RMemberNo(String l2RMemberNo) {
        this.l2RMemberNo = l2RMemberNo;
    }

    private String serialNo;

    @Basic
    @javax.persistence.Column(name = "serial_no", nullable = false, length = 32)
    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    private String cardNo;

    @Basic
    @javax.persistence.Column(name = "card_no", nullable = false, length = 20)
    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    private String customerId;

    @Basic
    @javax.persistence.Column(name = "customer_id", nullable = false, length = 20)
    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    private String cardType;

    @Basic
    @javax.persistence.Column(name = "card_type", nullable = true, length = 20)
    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    private String cardLevel;

    @Basic
    @javax.persistence.Column(name = "card_level", nullable = true, length = 20)
    public String getCardLevel() {
        return cardLevel;
    }

    public void setCardLevel(String cardLevel) {
        this.cardLevel = cardLevel;
    }

    private Date expireDate;

    @Basic
    @javax.persistence.Column(name = "expire_date", nullable = true)
    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    private String name;

    @Basic
    @javax.persistence.Column(name = "name", nullable = true, length = 20)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private String sex;

    @Basic
    @javax.persistence.Column(name = "sex", nullable = true, length = 2)
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    private String mobile;

    @Basic
    @javax.persistence.Column(name = "mobile", nullable = true, length = 20)
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    private String birth;

    @Basic
    @javax.persistence.Column(name = "birth", nullable = true, length = 20)
    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    private String idType;

    @Basic
    @javax.persistence.Column(name = "id_type", nullable = true, length = 20)
    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType;
    }

    private String idNo;

    @Basic
    @javax.persistence.Column(name = "id_no", nullable = true, length = 20)
    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    private String phone;

    @Basic
    @javax.persistence.Column(name = "phone", nullable = true, length = 20)
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    private String email;

    @Basic
    @javax.persistence.Column(name = "email", nullable = true, length = 32)
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    private String totalTimes;

    @Basic
    @javax.persistence.Column(name = "total_times", nullable = true, length = 32)
    public String getTotalTimes() {
        return totalTimes;
    }

    public void setTotalTimes(String totalTimes) {
        this.totalTimes = totalTimes;
    }

    private BigDecimal points;

    @Basic
    @javax.persistence.Column(name = "points", nullable = true, precision = 2)
    public BigDecimal getPoints() {
        return points;
    }

    public void setPoints(BigDecimal points) {
        this.points = points;
    }

    private BigDecimal freezePoints;

    @Basic
    @javax.persistence.Column(name = "freeze_points", nullable = true, precision = 2)
    public BigDecimal getFreezePoints() {
        return freezePoints;
    }

    public void setFreezePoints(BigDecimal freezePoints) {
        this.freezePoints = freezePoints;
    }

    private String recName;

    @Basic
    @javax.persistence.Column(name = "rec_name", nullable = true, length = 20)
    public String getRecName() {
        return recName;
    }

    public void setRecName(String recName) {
        this.recName = recName;
    }

    private String recCardNo;

    @Basic
    @javax.persistence.Column(name = "rec_card_no", nullable = true, length = 20)
    public String getRecCardNo() {
        return recCardNo;
    }

    public void setRecCardNo(String recCardNo) {
        this.recCardNo = recCardNo;
    }

    private String status;

    @Basic
    @javax.persistence.Column(name = "status", nullable = true, length = 10)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    private String balance;

    @Basic
    @javax.persistence.Column(name = "balance", nullable = true, length = 10)
    public String getBalance() {
        return balance;
    }

    public void setBalance(String balance) {
        this.balance = balance;
    }

    private String optUserName;

    @Basic
    @javax.persistence.Column(name = "opt_user_name", nullable = true, length = 20)
    public String getOptUserName() {
        return optUserName;
    }

    public void setOptUserName(String optUserName) {
        this.optUserName = optUserName;
    }

    private String openId;

    @Basic
    @javax.persistence.Column(name = "open_id", nullable = true, length = 20)
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RYhMember that = (L2RYhMember) o;

        if (groupCode != null ? !groupCode.equals(that.groupCode) : that.groupCode != null) return false;
        if (hotelCode != null ? !hotelCode.equals(that.hotelCode) : that.hotelCode != null) return false;
        if (l2RMemberNo != null ? !l2RMemberNo.equals(that.l2RMemberNo) : that.l2RMemberNo != null) return false;
        if (serialNo != null ? !serialNo.equals(that.serialNo) : that.serialNo != null) return false;
        if (cardNo != null ? !cardNo.equals(that.cardNo) : that.cardNo != null) return false;
        if (customerId != null ? !customerId.equals(that.customerId) : that.customerId != null) return false;
        if (cardType != null ? !cardType.equals(that.cardType) : that.cardType != null) return false;
        if (cardLevel != null ? !cardLevel.equals(that.cardLevel) : that.cardLevel != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (sex != null ? !sex.equals(that.sex) : that.sex != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (birth != null ? !birth.equals(that.birth) : that.birth != null) return false;
        if (idType != null ? !idType.equals(that.idType) : that.idType != null) return false;
        if (idNo != null ? !idNo.equals(that.idNo) : that.idNo != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;
        if (email != null ? !email.equals(that.email) : that.email != null) return false;
        if (totalTimes != null ? !totalTimes.equals(that.totalTimes) : that.totalTimes != null) return false;
        if (points != null ? !points.equals(that.points) : that.points != null) return false;
        if (freezePoints != null ? !freezePoints.equals(that.freezePoints) : that.freezePoints != null) return false;
        if (recName != null ? !recName.equals(that.recName) : that.recName != null) return false;
        if (recCardNo != null ? !recCardNo.equals(that.recCardNo) : that.recCardNo != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (balance != null ? !balance.equals(that.balance) : that.balance != null) return false;
        if (optUserName != null ? !optUserName.equals(that.optUserName) : that.optUserName != null) return false;
        if (openId != null ? !openId.equals(that.openId) : that.openId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = groupCode != null ? groupCode.hashCode() : 0;
        result = 31 * result + (hotelCode != null ? hotelCode.hashCode() : 0);
        result = 31 * result + (l2RMemberNo != null ? l2RMemberNo.hashCode() : 0);
        result = 31 * result + (serialNo != null ? serialNo.hashCode() : 0);
        result = 31 * result + (cardNo != null ? cardNo.hashCode() : 0);
        result = 31 * result + (customerId != null ? customerId.hashCode() : 0);
        result = 31 * result + (cardType != null ? cardType.hashCode() : 0);
        result = 31 * result + (cardLevel != null ? cardLevel.hashCode() : 0);
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (birth != null ? birth.hashCode() : 0);
        result = 31 * result + (idType != null ? idType.hashCode() : 0);
        result = 31 * result + (idNo != null ? idNo.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (totalTimes != null ? totalTimes.hashCode() : 0);
        result = 31 * result + (points != null ? points.hashCode() : 0);
        result = 31 * result + (freezePoints != null ? freezePoints.hashCode() : 0);
        result = 31 * result + (recName != null ? recName.hashCode() : 0);
        result = 31 * result + (recCardNo != null ? recCardNo.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (balance != null ? balance.hashCode() : 0);
        result = 31 * result + (optUserName != null ? optUserName.hashCode() : 0);
        result = 31 * result + (openId != null ? openId.hashCode() : 0);
        return result;
    }
}
